﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Lamex.Library;

namespace Lamex.mPPC.UI
{
    public partial class frmPPC_Tube_OrderOptimization : frmBaseChild
    {
        public frmPPC_Tube_OrderOptimization()
        {
            InitializeComponent();
        }

        private void frmPPC_Tube_OrderOptimization_Resize(object sender, EventArgs e)
        {
            splitContainerControl1.SplitterPosition = (this.Height - 66) / 2;

            splitContainerControl2.SplitterPosition = this.Width / 3;
            splitContainerControl3.SplitterPosition = this.Width / 3;
        }

        private void frmPPC_Tube_OrderOptimization_Load(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            string sql = @"SELECT distinct a.PRODUCT_DATE,a.PRODUCT_ORDER_NO,a.FOLLOW_NO
                                FROM Transfer_Panel_Cutting AS a
                                LEFT JOIN PPC_HPL430_Cutting_State AS b
                                ON a.PRODUCT_ORDER_NO=b.PRODUCT_ORDER_NO and a.FOLLOW_NO=b.FOLLOW_NO
                                WHERE ISNULL(doneCSV,'')='' AND UPPER(ISNULL(a.FOLLOW_NO,'')) LIKE 'PN%' ORDER BY a.FOLLOW_NO,a.PRODUCT_ORDER_NO";
            dt = Lamex.Base.BaseBuildSql.GetDataTableBySql(sql);
            gridControl1.DataSource = dt;
        }
    }
}